1. Field of the Invention
Embodiments of the present invention generally relate to making a decision to cap the size of a slice in an early stage of video encoding.
2. Description of the Related Art
H.264/MPEG-4 AVC, referred to as H.264 herein, is a block-oriented motion-compensation-based codec standard developed by the International Telecommunication Union (ITU) Telecommunication Standardization Sector (ITU-T) Video Coding Experts Group (VCEG) together with the ISO/IEC Moving Picture Experts Group (MPEG). The ITU-T H.264 standard and the ISO/IEC MPEG-4 AVC standard (formally, ISO/IEC 14496-10-MPEG-4 Part 10, Advanced Video Coding) are jointly maintained so that they have identical technical content. H.264 specifies both a Network Abstraction Layer (NAL) and a Video Coding Layer (VCL). In general, the VCL encodes the video signal, and the NAL formats the output of the VCL into NAL units that contain an integer number of bytes for conveyance by a variety of transport layers or storage media. For example, the NAL may map VCL data to transport layers such as RTP/IP for real-time wire-line and wireless internet services or ITU-T H.300 series terminals for wire-lien and wireless conversational services.
The ITU-T Recommendation H.241, entitled “Extended Video Procedures and Control Signals for H.300 Series Terminals”, establishes the communication procedures for the use of advanced video codecs, including H.264, with H.300 series terminals such as the communication terminals of ITU-T Recs. H.310, H.320, H.321, H.322, H.323 and H.324. These communication procedures include control, indication, capability exchange and transport mechanisms. H.241 also specifies that the maximum size of NAL units generated by a video codec is constrained by the size of the maximum transmission unit (MTU) of an IP-network. That is, to avoid IP-layer packet fragmentation, H.241 states that NAL units should be substantially shorter than the MTU size of the network. For example, on an Ethernet network with a 1472 byte MTU, H.241 recommends a maximum size of 1200 bytes for a NAL Unit to allow for addition of a header without exceeding the MTU size of the network.
To reduce error due to packet losses in video streaming over an IP-network, the NAL units may be generated such that each NAL unit contains an independently decodable piece of video data, i.e., a slice of a picture in a video stream. That is, in H.264, a picture may be segmented into sequences of macroblocks referred to as slices that are separately encoded. As used herein, the term “picture” refers to a frame or a field of a frame and the term “frame” refers to a complete image captured during a known time interval. A single slice may be encapsulated in a single NAL unit. It is the responsibility of the video encoder to ensure that the sizes of the slices in the output bit stream comply with the maximum allowed NAL unit size.